<template>
  <div>
    <!-- 搜索框 -->
    <Need @searchs="searchValue"></Need>

    <!-- 表单 -->
    <div class="sheet">
      <!-- 表单标题 -->
      <div class="search-title">
        <div class="search-title-a">订单列表</div>
      </div>
      <div class="search-title-a">
        <el-tabs type="card" @tab-click="handleClick">

            <Uncommitted :search="search" :sta0="sta0"></Uncommitted>

        </el-tabs>
      </div>
    </div>
  </div>
</template>

<script>
import Need from "@/view/vehicle/need";
import Uncommitted from "@/view/vehicle/Uncommitted";
import Submitted from "@/view/vehicle/Submitted";
import Canceled from "@/view/vehicle/Canceled";
export default {
  name: "vehicle",
  data() {
    return {
      search: {
        vehicleId: "",
        carPlate: "",
        carrierName: "",
        driverName: ""
      },
      sta0: 1,
    };
  },
  components: {
    Uncommitted,
    Submitted,
    Canceled,
    Need,
  },
  methods: {
    handleClick(tab, event) {
      this.sta0++;
      console.log("asdoaifoahbfgoq");
      console.log(tab, event);
    },

    searchValue(val) {
      this.search.vehicleId = val.vehicleId;
      this.search.carPlate = val.carPlate;
      this.search.carrierName = val.carrierName;
      this.search.driverName = val.driverName;
      console.log("asoidfyoaif");
      console.log(val.carPlate);
    },
  },
  mounted() {},
  created() {},
};
</script>

<style>
</style>
